package atguigu.thread;

public class ThreadLocalTest {

	public static void main(String[] args) {
		
		UserSession userSession = new UserSession();
		ThreadLocal threadLocal = userSession.getLocalUser();
		Object object = threadLocal.get();
		if(object == null) {
			User user = new User();
			user.setName("a");
			user.setPswd("b");
			threadLocal.set(user);
		}else {
			User user = (User) object;
			user.setName("a");
			user.setPswd("b");
		}
		
		
		
		
		
	}
}
